package cn.llk.mall.controller.api;

import cn.hutool.json.JSONUtil;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.DateFormat;
import java.util.Date;
import java.util.HashMap;

/**
 * Create By like On 2021-04-19 19:31
 */
@RestController
public class IndexController {

    @RequestMapping("/hello")
    public String hello( String name, Integer age) {
        HashMap<String, String> map = new HashMap<>();
        map.put("name", name);
        map.put("age", String.valueOf(age));
        System.out.println("hello");
        return JSONUtil.toJsonStr(map);
    }
}
